package com.zhouyu.service;

import com.zhouyu.tool.ZhouyuInject;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author 周瑜
 */
@Component
public class UserService {

	@Value("zhouyu")
	private User user;

	private OrderService orderService;

	@ZhouyuInject
	private String xxx;

	@PostConstruct
	public void initSoming(){
		System.out.println("invoke init Somining");
	}

	public void setOrderService(OrderService orderService) {
		this.orderService = orderService;
	}

	public void test() {
		System.out.println(user.getName());
	}

	public void printOrderService(){
		System.out.println(orderService);
	}

	public void printxxx(){
		System.out.println(xxx);
	}

}
